#include <algorithm>
#include <initializer_list>
#include <iostream>
#include <tuple>
#include <vector>

using namespace std;

void test2_1() { constexpr int a = 5; }

constexpr int test2_1_1() { return 10; }

void test2_2() {
  vector<int> vec = {1, 2, 3, 4};
  if (auto it = std::find(vec.begin(), vec.end(), 3); it != vec.end()) {
    *it = 4;
    cout << vec[2] << endl;
  }
}

struct test2_3_s {
  std::vector<int> vec;
  test2_3_s(const std::initializer_list<int> list) {
    for (auto it = list.begin(); it != list.end(); ++it) {
      vec.push_back(*it);
    }
  }
};
void test2_3() {
  test2_3_s t = {1, 2, 3, 4, 5};
  return;
}

void test2_4() {
  // auto [x, y, z] = std::make_tuple(1, 2.3, "456");
  tuple<int, double, string> t = std::make_tuple(1, 2.3, "456");
  auto [x, y, z] = t;
  cout << x << "," << y << "," << z << endl;
}

// int add_auto(auto x, auto y) { return x + y; }
// void test3_1() { cout << add_auto(3, 4) << endl; }

template <typename T, typename U>
auto add2(T x, U y) {
  return x + y;
}
void test3_2() { cout << add2(1, 3) << endl; }

decltype(auto) test3_3() { return 3; }

void test4_1() {
  vector<int> vec = {1, 2, 3};
  for (auto ele : vec) {
  }
  for (auto& ele : vec) {
  }
}

void test5_1() { using test = vector<int>; }

template <typename... Ts>
void test5_2(Ts... args) {
  cout << sizeof...(args) << endl;
}

template <typename... T>
auto test5_3(T... t) {
  return (t + ...);
}

struct Base {
  virtual void foo();
};
struct SubClass : Base {
  virtual void foo() override;
  // virtual void foo(int) override;
};
struct Base1 {
  virtual void foo() final;
};
struct SubClass1 final : Base1 {};
// struct SubClass2:SubClass1 {};
// struct SubClass3 : Base1 {
//   void foo()
// };

struct Magic {
  Magic() = default;
  Magic& operator=(const Magic&) = delete;
};

enum struct new_enum : int {};

int main() { return 0; }